import request from '@/utils/request'
// 1.查询企业的部门列表
export const getDepartments = function() {
  return request.get('/company/department')
}

// 2.获取员工简单列表
export const getSimpleEmployees = function() {
  return request.get('/sys/user/simple')
}

// 3.新增部门
export const addDepartment = function(data) {
  return request.post('/company/department', data)
}

// 4.删除部门
export const doDelDepartments = function(id) {
  return request.delete('/company/department/' + id)
}

// 5.编辑部门
export const getDepartmentsById = function(id) {
  return request.get('/company/department/' + id)
}

// 6.编辑成功 - 将数据回传回去
export const upDataDepartment = function(data) {
  return request.put('/company/department/' + data.id, data)
}
